package com.isorf.mapper;

import com.isorf.pojo.Link;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LinkMapper {
    //这个是添加的Mapper
    @Insert("insert into link(name,url,image,remarks) values(#{name},#{url},#{image},#{remarks})")
    int addLink(Link link);
    //这个是删除的Mapper
    @Delete("delete from link where id=#{id}")
    int deleteLink(int id);
    @Select("select * from link")
    List<Link> pageList();
}
